#include"head.h"


int RemoveFirst(Information s[], int n)/*删除第一个*/
{	
	for (int i=0; i<n-1; i++)
	{
		s[i]=s[i+1];
	}
	
	n=n-1;
	return n;
}

int RemoveLast(Information s[], int n)/*删除最后一个*/
{
	n=n-1;
	return n;
}

int RemoveAppoint(Information s[], int n)/*删除指定姓名对应信息*/
{
	char Appointname[20];
	fflush(stdin);
	printf("请输入指定姓名：");
	gets(Appointname);
	
	int flag;
	for (int i=0; i<n; i++)
	{
		
		if(strcmp(s[i].name,Appointname)==0)
		{
			flag=1;
			for (int j=i; j<n; j++)
			{
				s[j]=s[j+1];
			}
		}
		
	}
	if(flag!=1)
	{
		printf("未找到！\n");
		
	}
	else
	{
		n=n-1;
	}
	return n;	
}